package com.uppfind.framework.dao.api.common;

import java.util.LinkedList;
import java.util.List;

/**
 * 执行条件
 */
public class Term implements Cloneable {

    /**
     * column和value的连接条件,默认为eq
     */
    public String linkType = TermType.eq.getValue();
    /**
     * 属性
     */
    private String property;
    /**
     * 值
     */
    private String value;
    /**
     * 不同<column和value>的连接条件,默认为and
     */
    private String joinType = TermType.and.getValue();

    /**
     * TODO 处理嵌套的条件
     */
    private List<Term> terms = new LinkedList<>();

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getLinkType() {
        return linkType;
    }

    public void setLinkType(String linkType) {
        this.linkType = linkType;
    }

    public String getJoinType() {
        return joinType;
    }

    public void setJoinType(String joinType) {
        this.joinType = joinType;
    }

    public List<Term> getTerms() {
        return terms;
    }

    public void setTerms(List<Term> terms) {
        this.terms = terms;
    }
}
